package com.ftg.learn.pattern.prototype;

import javax.xml.bind.SchemaOutputResolver;

/**
 * @author kangjx
 * @createTime 2022/8/9
 */
public class LearnPro  implements  Cloneable{

    public LearnPro() {
        System.out.println("===");
    }

    public void test3(){
        System.out.println("---");
    }


    public static void main(String[] args) throws CloneNotSupportedException {
        LearnPro l = new LearnPro();
        LearnPro l1 = new LearnPro();
        System.out.println(l == l1);

        Object l2 = l1.clone();
        LearnPro l3 = (LearnPro) l2;
        l3.test3();
        System.out.println(l == l3);

    }


}
